﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage/AdminMasterPage.master" AutoEventWireup="true" CodeFile="FinLend002.aspx.cs" Inherits="Admin_FinLend_FinLend002" %>

<asp:Content ID="Content1" ContentPlaceHolderID="phScript" Runat="Server">
    <script type="text/javascript" src="/Scripts/Controls/DatePicker/WdatePicker.js""></script>
    <script type="text/javascript">
        
        function searchDiv() {
            $("#tbSearch").toggle("fast");
            if ($("#divButton").hasClass("open")) {
                $("#divButton").removeClass("open");
                $("#divButton").addClass("close")
            }
            else {
                $("#divButton").removeClass("close");
                $("#divButton").addClass("open")
            }

        }

        function tijiao()
        {
            var checkList = $(".pagnationtable input:checked");
            if (checkList.length > 0) {
                if (confirm("您确定要提交的凭证？")) {
                    var ids = "";
                    checkList.each(function () {
                        ids += $(this).attr("id").replace("chk_sel", "") + ",";
                    });
                    OpenWindow('提交凭证', 'A', '/Admin/FinLend/FinLend002b.aspx?ids=' + ids, 1200, 740);
                }
            }
            else {
                alert("请选择凭证!");
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="width: 100%; min-width: 700px">        
        <div class="searchBox">
            <div class="sb1">搜索条件</div>
            <div class="sb2 close" onclick="searchDiv()" id="divButton"></div>
            <table width="100%" cellspacing="2" cellpadding="2" id="tbSearch">
                <tr>
                    <td>借阅类型:
                    </td>
                    <td>
                        <yncWebDDL:DrpCodeTable ID="drpLendType" runat="server" Category="LendType">
                        </yncWebDDL:DrpCodeTable>
                    </td>
                    <td class="xin_y2">凭证所属公司:
                    </td>
                    <td>
                        <yncWebDDL:DrpCompanyName ID="drpCompanyName" runat="server" Required="true" ShowSelectedItem="true">
                        </yncWebDDL:DrpCompanyName>
                    </td>

                </tr>
                <tr>
                    <td>借阅人:
                    </td>
                    <td>
                        <yncWebDDL:DrpUsers ID="drpLoanee" runat="server" ShowSelectedItem="true">
                        </yncWebDDL:DrpUsers>
                    </td>
                    <td>借阅人主管:</td>
                    <td>
                        <yncWebDDL:DrpUsers ID="drpLeader" runat="server" ShowSelectedItem="true">
                        </yncWebDDL:DrpUsers>
                    </td>
                </tr>
                <tr>
                    <td>创建日期:
                    </td>
                    <td colspan="3">
                        <span style="color: #FF6600;">
                            <input class="Wdate textBox" style="width: 180px;" runat="server" readonly="readonly"
                                type="text" id="txtStartDate" clientidmode="Static" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'txtEndate\')||$dp.$DV(\'9998-12-31\')}'})" />&nbsp;&nbsp;至&nbsp;&nbsp;
                    <input class="Wdate textBox" runat="server" readonly="readonly" type="text" id="txtEndate"
                        clientidmode="Static" style="width: 180px;" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'txtStartDate\');}',maxDate:'9998-12-31'})" />
                        </span>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" align="left">
                        <asp:Button ID="Button1" runat="server" Text="查询" OnClick="btnSearch_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <table width="100%" cellspacing="2" cellpadding="2" class="menu" align="left" style="margin-top:10px;">
            <td style="width:3px;">
                &nbsp;
            </td>
            <td class="td">
                <a class="submit" onclick="tijiao()" href="#">提交审核</a>
            </td>
        </table>


        <yncWeb:PagnationGrid PageSize="30" ID="pageGrid" runat="server" OnOnPageIndexChange="PageChanged">
            <HeaderTemplate>
                <table width="100%" cellspacing="0" cellpadding="0" class="pagnationtable" align="left">
                    <thead>
                        <tr>
                            <th width="40px">
                                序号
                            </th>
                            <th width="80px" class="center">
                                操作
                            </th>
                            <th width="100px">
                                借阅类型
                            </th>
                             <th width="100px">
                                凭证所属公司
                            </th>
                            <th width="100px">
                                借阅人
                            </th>
                            <th width="160px">
                                借阅人邮件
                            </th>
                            <th width="160px">
                                借阅人电话
                            </th>
                            <th width="100px">
                                借阅人主管
                            </th>
                            <th width="160px">
                                借阅人主管邮件
                            </th>
                            <th width="120px">
                                申请借阅日期
                            </th>
                            <th width="100px">
                                预计归还日期
                            </th>
                            <th width="90px">
                                借阅凭证数量
                            </th>
                            <th>
                                状态
                            </th>
                            <th>
                                备注
                            </th>
                        </tr>
                    </thead>
                    <tbody>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <input type="hidden" id="h<%# Eval(FinLendMetadata.ColumnNames.LendID) %>"  value="<%# Eval(FinLendMetadata.ColumnNames.LendID) %>"/>
                                <input type="checkbox" id="chk_sel<%# Eval(FinLendMetadata.ColumnNames.LendID) %>" />
                                <asp:Label ID="lbReceiptID" runat="server" Visible="false" Text = "<%# Eval(FinLendMetadata.ColumnNames.LendID) %>"></asp:Label>
                        <%# Container.ItemIndex +1 %>
                    </td>
                     <td>
                        <a class="aCheck"  title="判断" href="FinLend002a.aspx?lendId=<%# Eval(FinLendMetadata.ColumnNames.LendID)%>" ></a>
                    </td>
                    <td>
                        <%# Eval("LendTypeName")%>
                    </td>                    
                    <td>
                        <%# Eval(FinLendMetadata.ColumnNames.CompanyName)%>
                    </td>
                    <td>
                        <%# Eval(FinLendMetadata.ColumnNames.Loanee)%>
                    </td>
                    <td>
                        <%# Eval(FinLendMetadata.ColumnNames.LoaneeEmail)%>
                    </td>
                    <td>
                        <%# Eval(FinLendMetadata.ColumnNames.LoaneePhone)%>
                    </td>
                     <td>
                        <%# Eval(FinLendMetadata.ColumnNames.Leader)%>
                    </td>
                     <td>
                        <%# Eval(FinLendMetadata.ColumnNames.LeaderEmail)%>
                    </td>
                    <td>
                        <%# Eval(FinLendMetadata.ColumnNames.LendDate)%>
                    </td>
                    <td>
                        <%# Eval(FinLendMetadata.ColumnNames.ReturnDate).FormatDate(ConstantValue.DateFormat)%>
                    </td>
                    <td>
                       <%# Business.getFinLendReceiptCount(Eval(FinLendMetadata.ColumnNames.LendID))%>
                    </td>
                    <td>
                        <%# Eval("LendStatusName")%>
                    </td>
                    <td>
                        <%# Eval(FinLendMetadata.ColumnNames.Comments)%>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </tbody> </table>
            </FooterTemplate>
        </yncWeb:PagnationGrid>
    </div>

    <script type="text/javascript">
        $("#tbSearch").hide();
    </script>
</asp:Content>

